

SOURCE = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SOURCE))
BIN=test
#BIN+=tac_dll
BINO=ssl_server.o ssl_client.o debug.o wsgevents.o tac_dll.o test_strtok.o  daemon.o ss	
CROSS_COMPILE = 
#BUILD_OPTION = -Wall
#GCC=$(CXX)
GCC=gcc
CFLAGS=
BUILD_OPTION=
DEBUG_OBJ_FILES := \
        debug.o 

LIB=

all:$(BIN)
test:$(OBJS)
	$(CROSS_COMPILE)$(GCC) $(BUILD_OPTION) $(CFLAGS) -o $@ $^
 
.PHONY:clean
clean:
	rm -f *.o *.d.* $(BIN)


#include $(SOURCE:.c=.d)	
	
%.o:%.c
	$(CROSS_COMPILE)$(GCC)  $(BUILD_OPTION) $(CFLAGS) -c $< -o $@
 
%.d: %.c
	@set -e; rm -f $@; \
	$(CXX) -MM $(CFLAGS) $< > $@.$$$$; \
	sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
	rm -f $@.$$$$



